package com.spring.util;

public class StringUtils {
	
	/**
	 * 首字母小写
	 */
	public static String toLowerFirstCase(String str) {
		return str.substring(0, 1).toLowerCase() + str.substring(1);
	}
	
	public static String toUpperFirstCase(String str) {
		return str.substring(0, 1).toUpperCase() + str.substring(1);
	}
	
	public static String getSetterMethodName(String fieldName) {
		return "set" + toUpperFirstCase(fieldName);
	}
	
	public static String getGetterMethodName(String fieldName) {
		return "get" + toUpperFirstCase(fieldName);
	}
	
	
	public static boolean isEmpty(String str) {
		return str == null || str.isEmpty();
	}
	
	public static boolean isNotEmpty(String str) {
		return !isEmpty(str);
	}
}
